
/*
*******************************************************************************
**
**    Project           : OLED160X128 Hello World Rev1A
**    Component         : Demo Module
**    Modulename        : OLED160X128 Dev Rev1A
**    Filename          : main.c
**    Compiler          : MPLAB
**    Date              : 2010-3-7 
**    Author            : ElabGuy
**    Abstract          : Contains the main() method and a OLED Text Test
**                      : functions for the operation of the OLED-160X128-DEV-V1C
**
**    Copyright (c) 2009-2010 www.ElabGuy.com
**    All rights reserved.
**
*******************************************************************************
*/
#include "HardwareProfile.h"
#include <plib.h>


/**********************
 * Configuration Bits *
 **********************/

        
    #pragma config UPLLEN   = ON            // USB PLL Enabled
    #pragma config UPLLIDIV = DIV_4         // USB PLL Input Divider
    #pragma config WDTPS    = PS1           // Watchdog Timer Postscale
    #pragma config FCKSM    = CSDCMD        // Clock Switching & Fail Safe Clock Monitor
    #pragma config OSCIOFNC = OFF           // CLKO Enable
    #pragma config IESO     = OFF           // Internal/External Switch-over
    #pragma config FSOSCEN  = OFF           // Secondary Oscillator Enable
    #pragma config CP       = OFF           // Code Protect
    #pragma config BWP      = OFF           // Boot Flash Write Protect
    #pragma config PWP      = OFF           // Program Flash Write Protect
    #pragma config ICESEL   = ICS_PGx2      // ICE/ICD Comm Channel Select
    #pragma config DEBUG    = ON            // Debugger Disabled for Starter Kit
            

/*****************Input clock 8MHZ, CPU clock 80MHZ****************/
	#pragma config FPLLMUL = MUL_20, FPLLIDIV = DIV_2, FPLLODIV = DIV_1, FWDTEN = OFF //8MHz crystal
	#pragma config POSCMOD = HS, FNOSC = PRIPLL, FPBDIV = DIV_1




/*************************************************************************
 * Function:        main              
 *
 * Notes:           Never exits.
 *************************************************************************/
 
int main ( void )
{
	int i,j;


    SYSTEMConfig(GetSystemClock(), SYS_CFG_WAIT_STATES | SYS_CFG_PCACHE); //PIC32 clock setup

	OLED_Init();

	while(1)
	{
		text_test();
	}

    return 0;
} 
 
